﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/UserMaster.master"
    Inherits="System.Web.Mvc.ViewPage<Eacademy.Domain.Models.AssessmentViewModel>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    Student Assessment
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <h3>
        Student Assessment - <span style="color: #209A06;">
            <%=Model.StudentName%>
        </span><a href="/mentor/students/view/<%=Model.SubjectId%>?status=true" class="back">Back to List</a></h3>
    <%using (Html.BeginForm("Assess", "Students", new { studentid = Model.StudentId, subjectid = Model.SubjectId}, FormMethod.Post))
      { %>
    <table class="grid">
        <tr>
            <th>
                Criteria
            </th>
            <th>
                Rating
            </th>
        </tr>
        <% 
            
        string rows;
        for (var i = 0; i < Model.QuestionList.Count; i++)
        {
            if (i % 2 == 0)
                rows = "gridrow";
            else
                rows = "gridrow_alternate";
        %>
        <tr class="<%= rows %>">
            <td align="left">
                <%: Html.DisplayFor(model => model.QuestionList[i].Question)%>
                <%: Html.HiddenFor(model => model.QuestionList[i].Rating)%>
                <%: Html.HiddenFor(model => model.QuestionList[i].QuestionId)%>
            </td>
            <td>
                <div class="rate" id="rating-<%: Html.DisplayFor(model => model.QuestionList[i].QuestionId) %>">
                </div>
            </td>
        </tr>
        <%
        }
            %>
    </table><br />
    <input type="submit" name="submit" value="Submit Rating" class="button-style" id="rating-submit" />
    <%} %>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ScriptContent" runat="server">
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="LeftContent" runat="server">
</asp:Content>
